﻿#pragma once

#if defined(WIN32) || defined(_WINDOWS)
/*
#define LP_WINDOWS
#define LPSYS_WIN_PC
#define LPSYS_WIN_RT
#define LPSYS_WIN_PHONE
*/
#define LPSYS_WIN
#define LP_WINDOWS

#ifdef WIN_RT
#define LPSYS_WIN_RT
#endif

#ifdef WIN_PHONE
#define LPSYS_WIN_PHONE
#endif

#if !defined(LPSYS_WIN_RT) && !defined(LPSYS_WIN_PHONE)
#define LPSYS_WINPC
#endif

#endif

#if defined(LINUX) || defined(linux)
#define LP_LINUX
#define LP_UNIX
#endif

#if defined(ANDROID)
#define LP_ANDROID
#define LP_UNIX
#endif

#if defined(__APPLE__) || defined(APPLE)
#define LP_UNIX
#define LP_APPLE
/*
#define LPSYS_MACOS
#define LPSYS_IOS
*/
#ifdef APPLE_IOS
#define LPSYS_IOS
#endif

#ifndef LPSYS_IOS
#define LPSYS_MACOS
#endif

#endif


#if !defined(LP_WINDOWS) &&\
    !defined(LP_UNIX)
#error "unknown system"
#endif


#ifndef NULL
#ifdef __cplusplus
#define NULL        0
#else
#define NULL        ((void *)0)
#endif
#endif

#ifdef LP_WINDOWS
    #ifndef WIN32_LEAN_AND_MEAN
       #define WIN32_LEAN_AND_MEAN
    #endif

    #ifdef LP_EXPORTS
        #ifdef LP_CORE
            #define LP_API    __declspec(dllexport)
        #else
            #define LP_API    __declspec(dllimport)
        #endif
    #else
        #define LP_API		extern
    #endif
#else
    #ifdef LP_EXPORTS
        #define LP_API 		extern
     #else
        #define LP_API
    #endif
#endif

#include <stddef.h>
#include <stdint.h>